<?php

namespace app\api\controller;
use app\api\logic\Info1688Logic;
use app\api\logic\Vip1688Logic;
use  app\common\controller\DBase;
class Info1688 extends DBase
{


    /**
     * @desc   1688签名设置
     * @author luckyXiong
     * @date   2025-01-06
     */
    public function get_1688_signature(){
        $params     = $this->request->post();
        $res    =  (new Info1688Logic())->get_1688_signature($params);
        return $this->jsonMessage(200, true, "操作成功!", $res);
    }



    /**
     * @desc   获取1688某个产品的sku信息
     * @author luckyXiong
     * @date   2025-01-06
     */
    public function get_product_skus(){
        $params = $this->request->post();
        $res    = (new Info1688Logic())->get_product_skus($params);
        return $this->jsonMessage(200, true, "操作成功!", $res);
    }


    /**
     * @desc   获取1688产品信息
     * @author luckyXiong
     * @date   2025-02-06
     */
    public function get_product(){
        $params = $this->request->post();
        $res    = (new Info1688Logic())->get_product($params);
        return $this->jsonMessage(200, true, "操作成功!", $res);
    }


    /**
     * @desc   查询采购单列表
     * @author zhangheng
     * @date   2025-01-06
     */
    public function PurchaseOrderList(){
        $params = $this->request->post();
        $res    = (new Info1688Logic())->PurchaseOrderList($params);
        return $this->jsonMessage(200, true, "操作成功!", $res);
    }


    /**
     * @desc   1688订单取消接口
     * @author luckyXiong
     * @date   2025-01-10
     */
    public function cancelOrder(){
        $params = $this->request->post();
        $res    = (new Info1688Logic())->cancelOrder($params);
        return $this->jsonMessage(200, true, "操作成功!", null);
    }






    /**
     * @desc   1688创建采购单接口
     * @author luckyXiong
     * @date   2025-02-08
     */
    public function createOrder(){
        $params = $this->request->post();
        $res    = (new Info1688Logic())->createOrder($params);
        return $this->jsonMessage(200, true, "操作成功!", $res);
    }


    /**
     * @desc   获取1688商品sku信息
     * @author luckyXiong
     * @date   2025-02-10
     */
    public function get_1688_url(){
        $params = $this->request->post();
        $res    = (new Info1688Logic())->getProductByUrls($params);
        return $this->jsonMessage(200, true, "操作成功!", $res);
    }


    /**
     * @desc   获取1688单条商品信息
     * @author luckyXiong
     * @date   2025-03-24
     */
    public function get_1688_one(){
        $params = $this->request->post();
        $res    = (new Info1688Logic())->get_1688_one($params);
        return $this->jsonMessage(200, true, "操作成功!", $res);
    }



    /**
     * @desc   1688单个商品保存接口
     * @author luckyXiong
     * @date   2025-02-10
     */
    public function add_1688_url(){
        $params = $this->request->post();
        (new Info1688Logic())->add_1688_url($params);
        return $this->jsonMessage(200, true, "操作成功!", '');
    }


    /**
     * @desc   1688配对列表
     * @author luckyXiong
     * @date   2025-02-11
     */
    public function get_1688_product(){
        $params = $this->request->post();
        $res    = (new Info1688Logic())->get_1688_product($params);
        return $this->jsonMessage(200, true, "操作成功!",$res);
    }





}